CREATE TABLE [dbo].[TDDISC_CC02]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[CO_CLIE] [dbo].[TD_VC_020] NOT NULL,
[CO_TIPO_DOCU] [dbo].[TD_VC_003] NOT NULL,
[NU_DOCU_CLIE] [dbo].[TD_VC_020] NOT NULL,
[NU_CORR] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TDDISC_CC__NU_CO__08A03ED0] DEFAULT ((0)),
[CO_CNTA_EMPR] [dbo].[TD_VC_020] NULL,
[TI_AUXI_EMPR] [dbo].[TD_VC_001] NULL,
[CO_CENT_COST] [dbo].[TD_VC_020] NULL,
[CO_ORDE_SERV] [dbo].[TD_VC_020] NULL,
[ST_DIST] [dbo].[TD_VC_001] NOT NULL,
[PO_DIST] [dbo].[TD_NU_009_004] NOT NULL CONSTRAINT [DF__TDDISC_CC__PO_DI__09946309] DEFAULT ((0)),
[IM_DIST] [dbo].[TD_NU_016_004] NOT NULL CONSTRAINT [DF__TDDISC_CC__IM_DI__0A888742] DEFAULT ((0)),
[DE_OBSE] [dbo].[TD_VC_100] NULL,
[CO_SUBR] [dbo].[TD_VC_003] NULL,
[CO_SUBR_LETR] [dbo].[TD_VC_003] NULL,
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDDISC_CC__CO_US__0B7CAB7B] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDDISC_CC__FE_US__0C70CFB4] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NOT NULL CONSTRAINT [DF__TDDISC_CC__CO_US__0D64F3ED] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NOT NULL CONSTRAINT [DF__TDDISC_CC__FE_US__0E591826] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDDISC_CC02] ADD CONSTRAINT [PK__TDDISC_C__0F21DB044C171ED4] PRIMARY KEY CLUSTERED  ([CO_EMPR], [CO_CLIE], [CO_TIPO_DOCU], [NU_DOCU_CLIE], [NU_CORR]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TDDISC_CC02] ADD CONSTRAINT [FK__TDDISC_CC02__473D5B1E] FOREIGN KEY ([CO_EMPR], [CO_CLIE], [CO_TIPO_DOCU], [NU_DOCU_CLIE]) REFERENCES [dbo].[TMDOCU_CL02] ([CO_EMPR], [CO_CLIE], [CO_TIPO_DOCU], [NU_DOCU_CLIE])
GO
